<?php

/**
 * Capital Direct Lending (http://www.philbsd.com/cdl)
 *
 * Copyright (C) 2008 Philippine Business Solution Developers <http://www.philbsd.com>
 * All rights reserved.
 *
 *
 * LICENSE
 *
 * This source file is subject to the GNU General Public License v3 license
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@philbsd.com so we can send you a copy immediately.
 *
 * @copyright  (c) 2008 Philippine Business Solution Developers. (http://www.philbsd.com)
 * @license    http://www.gnu.org/licenses/gpl-3.0.txt
 * @version    $Id: add.phtml 42 2008-03-12 10:05:35Z philbsd $
 */

?><p>
<?php

if (isset($this->messages)) {
	foreach ($this->messages as $field => $messages) {
		foreach ($messages as $message) {
			echo $this->escape($message) . "<br />\n";
		}
	}	
}

$record = array();
$record['name'] = isset($_POST['name'])? $_POST['name'] : "";
$record['description'] = isset($_POST['description'])? $_POST['description'] : "";

?>
<a href="<?php echo $this->baseUrl; ?>/admin/role">Lists</a>
<form action="<?php echo $this->baseUrl ?>/admin/role/add" method="POST">
<table cellpadding="2" cellspacing="2">
	<tr>
		<td align="right">Id:</td>
		<td><em>Autogenerated</em></td>
	</tr>
	<tr>
		<td align="right">*Name:</td>
		<td>
			<input name="name" type="text" value="<?php echo $record['name']; ?>" />			
		</td>
	</tr>
	<tr>
		<td align="right">Super User:</td>
		<td>
			<input name="super_user" type="checkbox" <?php echo ($record['super_user'])? ' checked="checked"' : ''; ?> />
		</td>
	</tr>
	<tr>
		<td align="right">Description:</td>
		<td>
            <textarea name="description"><?php echo $record['description']; ?></textarea>
        </td>
	</tr>
	<tr>
		<td align="right">&nbsp;</td>
		<td>
			<input type="submit" name="btnSave" value="Save">
			<input type="submit" name="btnCancel" value="Cancel">
		</td>
	</tr>
</table>
</form>
</p>
